# 代码编写者： 李朔
# 开发时间： 2021/9/7 22:04
import math
c=3
def judgeSquareSum(c):
    l_p,r_p=0,int(math.sqrt(c))
    # print(l_p,r_p)
    while l_p<=r_p:
        if l_p**2+r_p**2==c:
            return True
        elif l_p**2+r_p**2<c:
            l_p+=1
        else:
            r_p-=1
    return False
print(judgeSquareSum(c))